package za.co.chaotik.tron;

import java.util.Map;

import com.badlogic.gdx.Game;
import com.badlogic.gdx.Screen;

public abstract class ScreenTransitionGame extends Game {
	protected Screen activeScreen;
	protected Map<String, Screen> screens;
	
	public ScreenTransitionGame() {
		super();
	}
	
	public void addScreen(String name, Screen screen) {
		screens.put(name, screen);
	}
	
	public void showScreen(String name) {
		if (screens.containsKey(name)) {
			activeScreen = screens.get(name);
			this.setScreen(activeScreen);
		}
	}
}
